﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SettingPage.aspx.cs" Inherits="Portal.SettingPage" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="CSS/style.css" rel="stylesheet" rev="stylesheet" />
    <link href="CSS/global.css" rel="stylesheet" rev="stylesheet" />
    <link href="../Task/css/UI_Css/jquery-ui-1.8.17.custom.css" rel="stylesheet" rev="stylesheet" />
    <script type="text/javascript" src="script/jquery-1.7.1.min.js"></script>
    <script type="text/javascript" src="script/jquery-ui-1.8.17.custom.min.js"></script>
    <script type="text/javascript">
        $(function () {
            setTab(<%=TabIndex %>);
            $('#tabs').tabs({ selected:<%=TabIndex %>,
                select: function (event, ui) {
                    setTab(ui.index);
                }
            });
        });
        function setTab(index) {
            $("#li" + index).addClass("currently");
            $("#li" + index).siblings().removeClass("currently");
        }
        function ShowImg()
        {
            var path = $("#fileUpLoad").val();
            $("#imgFileImg").attr("src","/Portal/AjaxPage/GetImagePage.aspx?src="+path);
        }
        function ShowAddPage()
        {
        
           window.showModalDialog("MesageEdit.aspx","","dialogWidth=600px;dialogHeight=400px;dialogLeft=0px;dialogTop=0px;");
           location.reload();
        }
        
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <div class="listTable_1">
            <div class="tableTab" id="tabs">
                <div class="place">
                    <div class="placeleft">
                        <ul>
                            <li class="currently" id="li0"><a href="#divMsg">提示</a></li>
                            <li id="li1"><a href="#divView">常用意见</a></li>
                            <li id="li2"><a href="#divSignName">个人签名</a></li>
                        </ul>
                    </div>
                    <span class="more" style="display: inline-block"><a href="#">更多>></a></span>
                </div>
                <div id="divMsg">
                    <table border="0" cellpadding="0" cellspacing="0" class="listTable1">
                        <tr>
                            <td>
                                <input type="checkbox" id="cboEmail" runat="server" />电子邮件
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <input type="checkbox" id="cboMobile" runat="server" />手机短信
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <input type="checkbox" id="cboIM" runat="server" />IM
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <input type="checkbox" id="cboMsg" runat="server" />平台内消息
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Button ID="btnSave" runat="server" Text="保存" CssClass="btnBg" OnClick="btnSave_Click" />
                            </td>
                        </tr>
                    </table>
                </div>
                <div id="divView">
                    <table border="0" cellpadding="0" id="tableList" cellspacing="0" class="listTable1">
                        <tr>
                            <th style="width: 5px">
                            </th>
                            <th>
                                序号
                            </th>
                            <th>
                                常用意见及附言
                            </th>
                            <th>
                                编辑
                            </th>
                        </tr>
                        
                        <asp:Repeater ID="rptList" runat="server">
                            <ItemTemplate>
                                <tr>
                                    <td style="width: 5px">
                                        <input type="checkbox" id="cboList" class="choose" runat="server" />
                                        <asp:HiddenField ID="hidListID" runat="server" Value='<%#Eval("SETTING_ID") %>' />
                                    </td>
                                    <td>
                                        <%#Container.ItemIndex %>
                                    </td>
                                    <td>
                                        <%#Eval("SETTING_VALUE")%>
                                    </td>
                                    <td>
                                        <a href="#" onclick="ShowPage('MesageEdit.aspx?ID=<%#Eval("SETTING_ID") %>')">编辑</a>
                                    </td>
                                </tr>
                            </ItemTemplate>
                        </asp:Repeater>
                        <tr>
                            <td>
                                <input type="button" id="btnAdd" value="新增" onclick="ShowAddPage()" class="btnBg" />
                                <asp:Button ID="btnDelete" runat="server" Text="删除" CssClass="btnBg" OnClick="btnDelete_Click" />
                            </td>
                            <td colspan="3">
                                <webdiyer:AspNetPager ID="pagination" runat="server" Width="100%" meta:resourcekey="pagination"
                                    CssClass="aspNetPager" CustomInfoTextAlign="Left" HorizontalAlign="Right" NextPageText="下一页"
                                    PrevPageText="上一页" FirstPageText="首页" LastPageText="末页" PageIndexBoxType="DropDownList"
                                    ShowCustomInfoSection="Left" NavigationToolTipTextFormatString='{0}' NumericButtonTextFormatString="{0}">
                                </webdiyer:AspNetPager>
                            </td>
                        </tr>
                    </table>
                </div>
                <div id="divSignName">
                    <table border="0" cellpadding="0" id="table1" cellspacing="0" class="listTable3">
                        <tr>
                            <td>
                                选择签名图片
                            </td>
                            <td>
                                <asp:FileUpload ID="fileUpLoad" onchange="ShowImg()" runat="server" />
                                <asp:Button ID="btnUpLoad" runat="server" Text="上传" CssClass="btnBg" OnClick="btnUpLoad_Click" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                预览
                            </td>
                            <td>
                                
                                <div id="divImg" style="width:400px; height:400px;">
                                <img id="imgFileImg" src=""/>
                                </div>
                                <asp:Button ID="btnDeleteImg" runat="server" Text="删除" CssClass="btnBg" />
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <asp:Button ID="btnSaveSetting" runat="server" CssClass="btnBg" Text="保存" OnClick="btnSaveSetting_Click" />
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
    </div>
    </form>
</body>
</html>
<script type="text/javascript">
    function ShowPage(url) {
        window.showModalDialog(url, "", "dialogWidth=600px;dialogHeight=400px;dialogLeft=0px;dialogTop=0px;");
        location.reload();
     }
</script>
